//
//  StatusTableViewBottomView.swift
//  DSWeibo
//
//  Created by xiaomage on 15/9/13.
//  Copyright © 2015年 小码哥. All rights reserved.
//

import UIKit

class StatusTableViewBottomView: UIView {
    
    // MARK: - 懒加载
    override init(frame: CGRect) {
        super.init(frame: frame)
        // 初始化UI
        setupUI()
    }
    
    
    private func setupUI()
    {
        // 1.添加子控件
        addSubview(retweetBtn)
        addSubview(commonBtn)
        addSubview(unlikeBtn)
        
        // 2.布局子控件
        let width = UIScreen.main.bounds.size.width / 3
        retweetBtn.snp.makeConstraints { (make) -> Void in
            make.left.equalToSuperview()
            make.width.equalTo(width)
            make.height.equalToSuperview()
            make.top.equalToSuperview()
        }
        unlikeBtn.snp.makeConstraints { (make) -> Void in
            make.left.equalTo(self.retweetBtn.snp.right)
            make.width.equalTo(self.retweetBtn.snp.width)
            make.height.equalToSuperview()
            make.top.equalToSuperview()
            
        }
        commonBtn.snp.makeConstraints { (make) -> Void in
            make.left.equalTo(self.unlikeBtn.snp.right)
            make.width.equalTo(self.retweetBtn.snp.width)
            make.height.equalToSuperview()
            make.top.equalToSuperview()
            
        }
        
    }
    
    // MARK: - 懒加载
    // 转发
    private lazy var retweetBtn: UIButton = UIButton.createButton(imageName: "timeline_icon_retweet", title: "转发")
    
    // 赞
    private lazy var unlikeBtn: UIButton = UIButton.createButton(imageName: "timeline_icon_unlike", title: "赞")
    
    // 评论
    private lazy var commonBtn: UIButton = UIButton.createButton(imageName: "timeline_icon_comment", title: "评论")
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
